package com.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Create with Intellij idea
 * User:鲁智明
 * Date:2018/9/19
 * Time:15:07
 */
@RestController
public class IndexController {
    @Value("${server.port}")
    private String port;

    @RequestMapping("/")
    public String index(){
        return "SpringBoot2.0,端口号:"+port;
    }

    @RequestMapping("/a")
    public String a(){
        return "我是A项目";
    }

    @RequestMapping("/b")
    public String b(){
        return "我是B项目";
    }
}
